import request from '@/utils/request';

export interface LoginParamsType {
  userName: string;
  password: string;
  mobile: string;
  captcha: string;

  phone?: string;
  smsCoid?: string;
}

export async function phoneLogin(params: LoginParamsType) {
  return request('/service/partTimerWb/user/login', {
    method: 'POST',
    data: params,
  });
}

export async function getCaptcha(phone: number) {
  return request(`/service/partTimerWb/user/sendSms`, {
    method: 'POST',
    data: { phone },
  });
}
